//
//  QDUserServiceViewController.swift
//  QDMetroClient
//
//  Created by YueWen on 2019/2/22.
//  Copyright © 2019 YueWen. All rights reserved.
//

import UIKit

/// 乘客服务的控制器
class QDUserServiceViewController: QDLargeTitleViewController {

    override var titles: [String] {
        get {
            return ["车站设施","乘车安全","票务信息","出行指南","更多功能"]
        }
    }
    
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        largeTableHeaderView.title = "乘客服务"
        tableView.tableFooterView = nil
    }
    
    
    override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        let title = titles[indexPath.row]
        
        var viewController: UIViewController?
        
        switch title {
        case "车站设施": viewController = QDFacilityViewController()
        case "乘车安全": viewController = QDMetroSafeViewController(); QDUMEventManager.event(event: .safeRiding)
        case "票务信息": viewController = QDTicketSetviceViewController(); QDUMEventManager.event(event: .ticketMessage)
        case "出行指南": viewController = QDOriginTitleTableViewController(type: .guide); QDUMEventManager.event(event: .outGuide)
        case "更多功能": viewController = QDMoreViewController()
        default: viewController = UIViewController()
        }
        
        ritl_topNavigationPush(viewController!, animated: true)
    }
}
